import req from '@/utils/request'
const baseURL = process.env.VUE_APP_BASE_URL
import qs from "qs";
export function getAccount(data) {
  return req({
    method: 'get',
    url: baseURL + "/superlink/api/materialAccount/list?" + qs.stringify(data, { indices: false }),
  })
}
export function exportTasks(data) {
  return req({
    method: 'get',
    url: baseURL + "/superlink/api/materialAccount/export?" + qs.stringify(data, { indices: false }),
    responseType: 'arraybuffer',
  })
}
export function submitImport(data) {
  return req({
    method: 'post',
    url: baseURL + "/superlink/api/materialAccount/import/"+data.id+"?url=" + data.url.slice(4),
  })
}
export function delAccount(token) {
  return req({
    method: 'delete',
    url: baseURL + "/superlink/api/materialAccount/delete/" + token,
  })
}
export function putAccount(data, token) {
  return req({
    method: 'put',
    url: baseURL + "/superlink/api/materialAccount/update/" + token,
    data
  })
}
export function postAccount(data) {
  return req({
    method: 'post',
    url: baseURL + "/superlink/api/materialAccount/create",
    data
  })
}
export function submitAccount(data) {
  return req({
    method: 'post',
    url: baseURL + "/superlink/api/materialAccount/submit",
    data
  })
}
export function getDetails(token) {
  return req({
    method: 'get',
    url: baseURL + "/superlink/api/materialAccount/byToken/" + token,
  })
}
export function getDetailsByid(token) {
  return req({
    method: 'get',
    url: baseURL + "/superlink/api/materialAccount/byid/" + token,
  })
}


